<template>
	<h3>Programatically Navigation 编程式导航</h3>
	<button @click="$router.push('/users/123')">jump1</button>
	<button @click="$router.push({ path: '/users/456' })">jump2</button>
	<button @click="$router.push({ name: 'User', params: { id: 789 } })">
		jump3
	</button>
	<button @click="$router.push({ name: 'User', params: { id: 789 } })">
		jump4
	</button>
	<button
		@click="$router.push({ path: '/register', query: { plan: 'private' } })"
	>
		jump5
	</button>
	<button @click="$router.push({ path: '/about', hash: '#team' })">
		jump6
	</button>
	<button @click="$router.push({ path: '/about', hash: '#team',replace:true })">
		jump7
	</button>
	<button @click="$router.go(1)">
		前进
	</button>
	<button @click="$router.go(-1)">
		后退
	</button>
</template>

<script>
	/* 
		// 字符串路径
		router.push('/users/eduardo')

		// 带有路径的对象
		router.push({ path: '/users/eduardo' })

		// 命名的路由，并加上参数，让路由建立 url
		router.push({ name: 'user', params: { username: 'eduardo' } })

		// 带查询参数，结果是 /register?plan=private
		router.push({ path: '/register', query: { plan: 'private' } })

		// 带 hash，结果是 /about#team
		router.push({ path: '/about', hash: '#team' })
		*/
	export default {};
</script>

<style>
</style>